Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshot path pattern (closes #1602, #1651, #1974, #1975) #2562

Merged
merged 9 commits into from
Jul 6, 2018

Conversation

miherlosev
Copy link
Collaborator

No description provided.

@DevExpress DevExpress deleted a comment from testcafe-build-bot Jul 3, 2018
@DevExpress DevExpress deleted a comment from testcafe-build-bot Jul 3, 2018
@DevExpress DevExpress deleted a comment from testcafe-build-bot Jul 3, 2018
@DevExpress DevExpress deleted a comment from testcafe-build-bot Jul 3, 2018
@DevExpress DevExpress deleted a comment from testcafe-build-bot Jul 3, 2018
@DevExpress DevExpress deleted a comment from testcafe-build-bot Jul 3, 2018
@DevExpress DevExpress deleted a comment from testcafe-build-bot Jul 3, 2018
@DevExpress DevExpress deleted a comment from testcafe-build-bot Jul 4, 2018
@DevExpress DevExpress deleted a comment from testcafe-build-bot Jul 4, 2018
@testcafe-build-bot
Copy link
Collaborator

✅ Tests for the commit 07ab649 have passed. See details:

@DevExpress DevExpress deleted a comment from testcafe-build-bot Jul 4, 2018
@miherlosev miherlosev changed the title [WIP] Screenshot path pattern Screenshot path pattern (closes #1602, #1651, #1974, #1975) Jul 4, 2018
@miherlosev
Copy link
Collaborator Author

FPR @AndreyBelym @VasilyStrelyaev

@@ -18,8 +17,8 @@ const REMOTE_ALIAS_RE = /^remote(?::(\d*))?$/;
const DEFAULT_TEST_LOOKUP_DIRS = ['test/', 'tests/'];
const TEST_FILE_GLOB_PATTERN = `./**/*@(${Compiler.getSupportedTestFileExtensions().join('|')})`;

const DESCRIPTION = dedent(`
In the browser list, you can use browser names (e.g. "ie9", "chrome", etc.) as well as paths to executables.
const DESCRIPTION = `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no dedent here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, need to revert back this change

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit b81b460 have failed. See details:

@miherlosev
Copy link
Collaborator Author

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit b81b460 have failed. See details:

@miherlosev
Copy link
Collaborator Author

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit b81b460 have failed. See details:

@miherlosev
Copy link
Collaborator Author

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit b81b460 have failed. See details:

@miherlosev
Copy link
Collaborator Author

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit b81b460 have failed. See details:

@miherlosev
Copy link
Collaborator Author

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

✅ Tests for the commit b81b460 have passed. See details:

@miherlosev
Copy link
Collaborator Author

FPR

@churkin churkin self-requested a review July 4, 2018 15:41
@AndreyBelym
Copy link
Contributor

@@ -198,9 +197,10 @@ export default class Runner extends EventEmitter {
return this;
}

screenshots (path, takeOnFails = false) {
screenshots (path, takeOnFails = false, pattern) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add a default value to make clear that pattern is optional.

@@ -89,6 +88,7 @@ export default class CLIArgumentParser {
.option('-r, --reporter <name[:outputFile][,...]>', 'specify the reporters and optionally files where reports are saved')
.option('-s, --screenshots <path>', 'enable screenshot capturing and specify the path to save the screenshots to')
.option('-S, --screenshots-on-fails', 'take a screenshot whenever a test fails')
.option('-p, --screenshot-path-pattern <pattern>', 'use patterns to compose screenshot file names and paths: ${BROWSER}, ${BROWSER_VERSION}, ${OS}, ${OS_VERSION}, ${USERAGENT}, ${DATE}, ${TIME}, ${FIXTURE}, ${TEST}, ${TEST_INDEX}, ${FILE_INDEX}, ${QUARANTINE_ATTEMPT}')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make it a little shorter?

            .option('-p, --screenshot-path-pattern <pattern>', 'use patterns to compose screenshot file names and paths: ${BROWSER}, ${BROWSER_VERSION}, ${OS}, etc.')

Users will have to read documentation to use this feature anyway. So there's no need to list here all the variables. We can do it in the docs,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Without full description for some placeholders (${FILE_INDEX}, ${QUARANTINE_ATTEMPT}) it's a difficult to guess the replaced value.

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit b2c9875 have failed. See details:

@miherlosev
Copy link
Collaborator Author

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit b2c9875 have failed. See details:

@miherlosev
Copy link
Collaborator Author

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

✅ Tests for the commit b2c9875 have passed. See details:

@miherlosev
Copy link
Collaborator Author

FPR @churkin

@miherlosev miherlosev merged commit aa037f7 into DevExpress:master Jul 6, 2018
@miherlosev miherlosev deleted the screenshot_path_pattern branch July 6, 2018 10:13
static _getScreenshotBaseDirName () {
var now = Date.now();

return moment(now).format('YYYY-MM-DD_hh-mm-ss');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miherlosev You also fixed another bug here: the hours were not in 24h format, but are now! 🎉🎉🎉 Thank you!

kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this pull request Dec 18, 2019
…Express#1974, DevExpress#1975) (DevExpress#2562)

* Screenshot file pattern

* refactor test constrants

* small refactoring

* renames

* don't correct file path for custom file path

* try to fix tests2

* revert back correct file path for custom path

* revert dedent module

* fix review issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants